package cn.kn.sys.controller;

import cn.kn.common.model.R;
import cn.kn.sys.model.RoleResources;
import cn.kn.sys.service.RoleResourcesService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @author WangJiang
 * @create 2020-12-11 13:56
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("sys/roleResources")
public class RoleResourcesController {

    private final RoleResourcesService roleResourcesService;

    @PostMapping("/{roleId}")
    public R save(@PathVariable Long roleId, @RequestBody RoleResources[] resources){
        return roleResourcesService.save(roleId,resources);
    }

}
